/*
 * Copyright @ JuCheap All rights reserved.
 * 
 * 功能描述:数据过滤模型文件
 * 作者: JuCheap
 * 时间: 12/29/2019 11:23:44
 */

using JuCheap.Core.Infrastructure.Extentions;
using JuCheap.Core.Model.Message;

namespace JuCheap.Core.Model
{
	/// <summary>
	/// SysMessage Model
	/// </summary>	
	public partial class SysMessageFilter
	{
		/// <summary>
		/// UserId
		/// </summary>
		public string UserId { get; set; }

		/// <summary>
		/// 查询类型
		/// </summary>
		public MessageQueryType? QueryType { get; set; }

		/// <summary>
		/// 消息状态
		/// </summary>
		public MessageStatus? Status { get; set; }

		/// <summary>
		/// 查询条件预处理
		/// </summary>
		public void PreHandle()
		{
			if (SortField.IsBlank())
			{
				SortField = "Id";
			}
		}
	}
}
